<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../css/mui.css"/>
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../css/general.css"/>
		<style type="text/css">
			.slist{
				width: 100%;
			}
			
			.scss{
				width: 100%;
				display: flex;
				justify-content: center;
				align-items: center;
				flex-direction: column;
				margin-bottom: 0.2em;
			}
			.scss>div{
				width: 100%;
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding: 0.5em;
				background-color: white;
				
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav hbg">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left colorw"></a>
		    <h1 class="mui-title">交班记录</h1>
		</header>
		<div class="mui-content">
		    <div class="slist" id="slist">
		    	<!--
                	作者：592176224@qq.com
                	时间：2019-02-22
                	描述：
                	<div class="scss">
		    		<div class="">
		    			<span class="fe09">
		    				张三（10001）
		    			</span>
		    			<span class="fe07">
		    				2018-08-27
		    			</span>
		    		</div>
		    		<div class="">
		    			<span class="fe08">
		    				下方营业额：30000元
		    			</span>
		    			<span class="fe08">
		    				上交营业额：30000元
		    			</span>
		    		</div>
		    		
		    	</div>
                -->
		    	
		    </div>
		</div>
		<script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/mui.min.js"></script>
		<script src="../js/req.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/muishow.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			window.onload = function(){
				
				//getslist(list);
				getlist_work();
			}
			function getlist_work(){
				var data = {
					url:"/api/employee/list_work",
					data:{
						access_token:acctoken(),
					}
				}
				ajax(data,function(res){
					console.log(res);
					setlist_work(res.data.data);
					
				})
				
				
			}
			
			function setlist_work(list){
				var slist = document.getElementById("slist");
				var str = "";
				if(list.length>0){
					for (var i = 0; i < list.length; i++) {
						str += '<div class="scss"><div class=""><span class="fe09">'+
			    			list[i].employee.username +'  |  '+list[i].employee.job_number +
			    			'</span><span class="fe07">'+
			    			list[i].end_time+
			    			'</span></div><div class=""><span class="fe08">下放营业额：'+
			    			list[i].inhere_money+ 
			    			'元</span><span class="fe08">上交营业额：'+
			    			list[i].hand_in+
			    			'元</span></div></div>';
					}
				}else{
					str = '<div class="nolistdiv">暂无交班记录</div>'
				}
				slist.innerHTML = str;
				
			}
		</script>
	</body>

</html>